/*
 * @file    sz.cpp
 * @author  edward <libo@tencent.com>
 * @date    2013-04-04
 * @brief   
 * */

#include <iostream>

/*  
int my_size(int ar[]) {
    return sizeof(ar);
}
*/

template<typename T, int num>
int my_size(T(&ar)[num]) {
    return sizeof(ar);
}

int main() {
    int ar[] = {1, 2, 3, 10};
    float ar2[] = {1, 1.1,2.2,10.1,1.2,1.3};
    std::cout << sizeof(ar2);
    std::cout << my_size(ar2);
}
